package com.wicket.okrapp.integration.dto;

import com.wicket.okrapp.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Objects;

import lombok.Data;

/**
 * @desc BelowTargetCycleWeightDto
 * @使用场景
 */
@Data
public class BelowTargetCycleWeightDto extends BaseDto implements Serializable {

  /**
   * 对象目标周期权重设置ID
   */
  @ApiModelProperty("对象目标周期权重设置ID")
  private String objTargetCycleWeightSetId;

  /**
   * 被评对象目标周期ID
   */
  @ApiModelProperty("被评对象目标周期ID")
  private String evaObjTargetCycleId;

  /**
   * 权重
   */
  @ApiModelProperty("权重")
  private Double weightValue;

  /**
   * 权重分值
   */
  @ApiModelProperty("权重分值")
  private Double weightScore;

  /**
   * 父子中周期类型 PARENT_CYCLE:父周期 SUB_CYCLE:子周期 MID_CYCLE:中期
   */
  @ApiModelProperty("父子中周期类型")
  private String parentSubMidCycleType;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    BelowTargetCycleWeightDto that = (BelowTargetCycleWeightDto) o;
    return (
      objTargetCycleWeightSetId == that.objTargetCycleWeightSetId &&
      evaObjTargetCycleId == that.evaObjTargetCycleId &&
      weightValue == that.weightValue &&
      weightScore == that.weightScore &&
      parentSubMidCycleType == that.parentSubMidCycleType
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      objTargetCycleWeightSetId,
      evaObjTargetCycleId,
      weightValue,
      weightScore,
      parentSubMidCycleType
    );
  }

}
